#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Zhangcl

import multiprocessing
import time
import threading

def thread_run():
    print(threading.get_ident()) #获得线程的ID

def run(name):
    time.sleep(2)
    print('hello',name)
    t =threading.Thread(target=thread_run) #启动一个线程
    t.start()
if __name__ == '__main__':
    for i in range(10):
        p = multiprocessing.Process(target=run,args=(i,))
        p.start()
